Package edu.uky.ai.path
Class Sprite
java.lang.Object
edu.uky.ai.path.Location
edu.uky.ai.path.Sprite
public class Sprite extends Location
A sprite is a thing located in a 2D space that can move.
- Author:
- Stephen G. Ware
-
Constructor Details
-
Sprite
Creates a new sprite at a given location.- Parameters:
map- the map on which the sprite will appearx- the horizontal location of the spritey- the vertical location of the sprite
-
-
Method Details
-
move
public void move(int dx, int dy)Moves a sprite to a new location.- Parameters:
dx- the change in the horizontal positiondy- the change in the vertical position
-